#pragma once

#include <iostream>
using namespace std;

class CRemoveDuplicates
{
public:
	static int ExeRemoveDuplicates(int* nums,  int Length)
	{
		int i = 0, j = 1;

		if (0 == Length)
		{
			return 0;
		}

		for (j = 1; j < Length; j++)
		{
			if (nums[i] != nums[j])
			{
				i++;
				nums[i] = nums[j];
			}
		}
		return i + 1;
	}
};